﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Media;
using System.Windows.Media.Imaging;

namespace JPGResizer.Model
{
    /// <summary>
    /// 图片存储对象
    /// </summary>
    class MyImage
    {
        private BitmapSource _image;
        private string _filename;
        private string _filepath;
        private string _filefullpath;

        /// <summary>
        /// 图片的内容
        /// </summary>
        public BitmapSource ImageSource
        {
            get { return _image; }
            set { _image = value; }
        }

        /// <summary>
        /// 图片名
        /// 不包含文件的路径
        /// </summary>
        public string Filename
        {
            get { return _filename; }
            set { _filename = value; }
        }

        /// <summary>
        /// 图片的相对路径(相对于用户选择的文件夹)
        /// 不包含文件名
        /// </summary>
        public string Filepath
        {
            get { return _filepath; }
            set { _filepath = value; }
        }

        /// <summary>
        /// 图片的完整路径
        /// 不包含文件名
        /// </summary>
        public string FileFullpath
        {
            get { return _filefullpath; }
            set { _filefullpath = value; }
        }


        /// <summary>
        /// 初始化
        /// </summary>
        /// <param name="image">图片内容</param>
        /// <param name="filename">图片名，不包含文件的路径</param>
        /// <param name="filepath">图片的相对路径(相对于用户选择的文件夹)，不包含文件名</param>
        /// <param name="filefullpath">图片的完整路径，不包含文件名</param>
        public MyImage(BitmapSource image, string filename, string filepath, string filefullpath)
        {
            _image = image;
            _filename = filename;
            _filepath = filepath;
            _filefullpath = filefullpath;
        }

    }
}
